/*
 * Copyright 2008-2009 ArtisanLogic.com.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.artisanlogic.jingo.parser;

import java.util.SortedSet;

import com.artisanlogic.jingo.assembler.Dependency;

// =====================================================================================================================
// Handler.java                                                                                  Created on Feb 18, 2009
// ---------------------------------------------------------------------------------------------------------------------
/**
 * This interface is a behavior specification for classes that handle dependencies discovered by {@link Parser} 
 * implementations.
 * 
 * @author sean@artisanlogic.com
 * @since 0.9-Beta
 */
// =====================================================================================================================
public interface Handler {
	
  // -------------------------------------------------------------------------------------------------------------------
  // public abstract methods
  // -------------------------------------------------------------------------------------------------------------------
  
	/**
	 * This method handles dependencies discovered by {@link Parser} implementations.
	 * 
	 * @param depth The parameter holds the depth that the Jingo module dependency declaration was discovered at within 
	 *   the JavaScript source file.  A depth greater than one indicates a nested declaration.
	 * @param dependencies This parameter holds the dependencies discovered by the {@link Parser} implementation.
	 */
	void handleDependencies(int depth, SortedSet<Dependency> dependencies);
	
}
